<?php

namespace App\Providers\B2BProject\Admin;

use App\B2BProject\Admin\Authority\Auth;
use Illuminate\Support\ServiceProvider;

class AuthorityProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        $this->app['admin-auth']->setSessionStore($this->app['session.store']);
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton('admin-auth', function ($app) {
            return new Auth();
        });
    }
}
